%h1 New article

- form_for(@article) do |f|
  = f.error_messages

  %p
    %label{:for => :blog} Блог:
    %br
    = select_tag :blog, options_for_select(Blog.all.map {|blog| [blog.name, blog.id]})
    %br
    %label{:for => :title} Заглавие:
    %br
    = f.text_field :title
    %br
    %label{:for => :contents} Текст:
    %br
    = f.text_area :contents
  %p
    = f.submit "Create"

= link_to 'Back', articles_path
